package com.ddyx.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.ddyx.entity.Template;
import com.ddyx.mapper.TemplateMapper;
import com.ddyx.service.TemplateService;
import com.ddyx.util.ResponseForm;

import lombok.extern.slf4j.Slf4j;

@Service
@Slf4j
public class TemplateServiceImpl implements TemplateService{
	@Resource
	TemplateMapper templateMapper;

	@Override
	public ResponseForm getTemplateList() {
		ResponseForm result = new ResponseForm();
		try {
			List<Template> templateList = templateMapper.selectAll();
			result.setData(templateList);
		} catch (Exception e) {
			e.printStackTrace();
			result.setStatus(false);
			result.setMessage("操作有误");
			log.error("操作有误");
		}
		return result;
	}
}
